package com.heima.clients.article.fallback;

import com.heima.clients.article.IArticleClient;
import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.common.enums.AppHttpCodeEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author xiaquanen
 * @version 1.0
 * @project heima-leadnews
 * @date 2024/7/25 15:52:23
 */
@Component
@Slf4j
public class ArticleClientFallback implements IArticleClient {

    @Override
    public ResponseResult syncArticle(ArticleDto articleDto) {
        log.error("发生了服务的熔断降级了");
        return ResponseResult.errorResult(AppHttpCodeEnum.SERVER_ERROR);
    }

}
